import request from '@/utils/request'

// 查询课程列表
export function getSccourseList(query) {
  return request({
    url: '/school/sccourse/list',
    method: 'get',
    params: query
  })
}

// 查询课程详细
export function getCourseDeatil(id) {
  return request({
    url: '/school/sccourse/' + id,
    method: 'get'
  })
}

// 新增课程
export function addSccourse(data) {
  return request({
    url: '/school/sccourse',
    method: 'post',
    data: data
  })
}

// 修改课程
export function updateSccourse(data) {
  return request({
    url: '/school/sccourse',
    method: 'put',
    data: data
  })
}

// 删除课程
export function delSccourse(id) {
  return request({
    url: '/school/sccourse/' + id,
    method: 'delete'
  })
}

// 导出课程
export function exportSccourse(query) {
  return request({
    url: '/school/sccourse/export',
    method: 'get',
    params: query
  })
}


// 查询课程列表
export function getCourseByName(query) {
  return request({
    url: '/school/sccourse/getNewList',
    method: 'get',
    params: query
  })
}